<!--<?php
  session_start();
  if(!$_SESSION)
  {
    ?> 
     <script type="text/javascript">
     alert("Identifiquese"); 
     window.location="../Index.php";
     </script>
    <?php
 
  }
 ?> -->
<!DOCTYPE html>
<html>
  <head>
    <title>Perfiles - Cursos</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
    <script type="text/javascript" src="js/bootstrap-tab.js"></script>
    <script type="text/javascript" src="http://twitter.github.com/bootstrap/assets/js/bootstrap-tab.js"></script>
  </head>
  <body>
        <script src="http://code.jquery.com/jquery.js"></script>
        <script src="js/bootstrap.min.js"></script>
        
          <nav class="navbar-wrapper navbar-default navbar-fixed-top" role="navigation">
            <div class="collapse navbar-collapse navbar-ex1-collapse">
              <div class="collapse navbar-collapse">
                <ul class="nav navbar-nav">
                       <li><a href="ViewHome.php"><span class="glyphicon glyphicon-home"></span> Inicio</a></li>

                  <li><a href="ViewHome.php"><span class="glyphicon glyphicon-lock"></span> Carreras</a></li>

                  
                  <li class="dropdown">
                    <a href="ViewPerfiles.php" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-list-alt"></span> Perfiles</a>
                   <ul class="dropdown-menu" >
                    <li><a href="View_PA.php"><span class="glyphicon glyphicon-bookmark"></span> Perfil Acad&eacute;mico</a></li>
                    <li class="active"><a href="View_C.php"><span class="glyphicon glyphicon-book"></span> Perfil Curso</a></li>
                    <li><a href="#presupuesto" data-toggle="tab"><span class="glyphicon glyphicon-briefcase"></span> Perfil Presupuestarios</a></li> 
                  </ul>
                  </li>

                  <li><a href="ViewUsuarios.php"><span class="glyphicon glyphicon-user"></span> Usuarios</a></li>

                  <li><a href=""><span class="glyphicon glyphicon-calendar"></span> Horarios</a></li>

                  <li><a href=""><span class="glyphicon glyphicon-comment"></span> Reportes</a></li>

                  <ul class="nav navbar-nav navbar-right">
                    <li class="dropdown">
                      <a href="#" class="dropdown-toggle" data-toggle="dropdown"><span class="glyphicon glyphicon-asterisk"></span>
                      <ul class="dropdown-menu">
                        <li><a href="cerrarSesion.php">Salir</a></li>
                      </ul>
                    </li>
                  </ul>
            </div>
          </nav>
          <!--
          Se usa la de abajo para meter todo los forms.

          !-->

          <div class="container-fluid">
            <div class="jumbotron">
            <h3 class="text-success">Utilice este espacio para registrar, buscar los datos de Cursos impartidos en el campus</h3>
             <center>

               
                          <form action='ControlC.php' method='POST' class="form-horizontal"> 
                        <center>
                          <fieldset>

                            <div class="form-group">
                              <label class="col-lg-4 control-label" for="codigo"><h4>C&oacute;digo</h4></label>
                              <div class="col-lg-2">
                                 <input type='text' name='V_Pc_codigo'  class="form-control" id="codigo" placeholder="C&oacute;digo" style="width: 200px; padding: 2px"/> 
                             </div>
                            </div>
                           

                            <div class="form-group">
                              <label class="col-lg-4 control-label" for="nombre"><h4>Nombre</h4></label>
                              <div class="col-lg-2">
                               <input type='text' name='V_Pc_nombre'  class="form-control" id="nombre" placeholder="Nombre" style="width: 200px; padding: 2px"/>
                              </div>
                            </div>
                            

                            <div class="form-group">
                              <label class="col-lg-4 control-label" for="horasContacto"><h4>Horas Contacto</h4></label>
                              <div class="col-lg-2">
                               <input type='text' name='V_Pc_horasContacto'  class="form-control" id="horasContacto" placeholder="Horas Contacto" style="width: 200px; padding: 2px"/>
                              </div>
                            </div>  

                            <div class="form-group">
                              <label class="col-lg-4 control-label" for="creditos"><h4>Creditos</h4></label>
                              <div class="col-lg-2">
                                <input type='text' name='V_Pc_creditos' class="form-control" id="creditos" placeholder="Creditos" style="width: 200px; padding: 2px"/>
                              </div>
                            </div>    
                            
                            <div class="form-group">
                              <label class="col-lg-4 control-label" for="codigoCarrera"><h4>Carrera</h4></label>
                              <div class="col-lg-2">
                                <select class="form-control" id="codigoCarrera" name='V_Pc_codigoCarrera' style="width: 200px; padding: 2px">
                          <option disabled>Carrera a la cual pertenece</option> 
                          <option disabled></option>
                        <?php 
                        include('ModelConexion.php');
                         $objeto = new Conexion(); 
                         $consulta = $objeto->Consulta("
                            SELECT codigo,nombre 
                            FROM carreras;
                            ");
                         if ($objeto->numero_filas($consulta) > 0) 
                         {
                            while ($CarrerasListadas = $objeto->Arreglo($consulta)) 
                            {
                          
                           echo "<option value=".$CarrerasListadas['codigo'].">".$CarrerasListadas['nombre']."</option>\n"; 
                            }
                             
                         }
                        else
                         {
                           echo "<option disabled>No ha registrado carreras</option>";
                         }

                       
     
                        ?>
                        
                        </select>
                              </div>
                            </div>

                        <div class="form-group">
                          <label class="col-lg-4 control-label" for="nivelCarrera"><h4>Ciclo de carrera</h4></label>
                          <div class="col-lg-2">
                           <input type='text' name='V_Pc_nivelCarrera'  class="form-control" id="nivelCarrera" placeholder="Nivel de carrera" style="width: 200px; padding: 2px"/>
                          </div>
                        </div>

                          </fieldset>
                        </center>
                      
                        <div class="form-group">
                          <div class="col-lg-9">
                            <input type='submit' value='Agregar' class="btn btn-primary" /><input  type='hidden' value='1' name='PC_Crear' />
                          </div>
                        </div>
                        </form>
                      
                      <form action='View_C_Buscar.php'>
                         <div class="col-lg-9">
                           <input type='submit' value='Listar Cursos'  class='btn btn-info'>
                         </div>
                        
                      </form> 
          
       

             </center>
             
 
            </div>
          </div> 
 

          <footer>
            <div class="container">
              <div class="row">
                <div class="col-md-10">&copy; 2013 | Universidad Nacional | Sede Regional Chrotega | Campus Nicoya</div>
               
              </div>
            </div
>          </footer>
      
  
  
  </body>
</html>